Skip to content

启动共享内存远程调度服务 - StartRemoteServerShm

函数简介

B 端 使用本机共享内存队列建立远程调度通道(不经 TCP)。

接口名称

StartRemoteServerShm

DLL调用

c
int64_t StartRemoteServerShm(int64_t instance, char* token);

参数说明

参数名类型说明
instance长整数型OLAPlug 对象指针,由 CreateCOLAPlugInterFace 接口生成。
token字符串鉴权方式与 TCP 版一致;

示例

SDK 调用

cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
long handle = ola.StartRemoteServerShm("value");
csharp
using OLAPlug;

var ola = new OLAPlugServer();
long handle = ola.StartRemoteServerShm("value");
python
from OLAPlugServer import OLAPlugServer

ola = OLAPlugServer()
handle = ola.StartRemoteServerShm("value")
java
import com.olaplug.OLAPlugServer;

OLAPlugServer ola = new OLAPlugServer();
long handle = ola.StartRemoteServerShm("value");
cpp
var ola = com("OlaPlug.OlaSoft")
var handle = ola.StartRemoteServerShm("value")
vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
handle = ola.StartRemoteServerShm("value")
text
.局部变量 ola, OLAPlug
ola.创建 ()
handle = ola.StartRemoteServerShm("value")
aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var handle = ola.StartRemoteServerShm("value");
text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
长整数 handle = ola.StartRemoteServerShm("value")
cpp
#include "OLAPlugServer.h"

OLAPlugServer ola;
long handle = ola.StartRemoteServerShm("value");

原生 DLL 调用

cpp
StartRemoteServerShm(instance, "value");
csharp
using System.Runtime.InteropServices;
using System.Text;

[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern int StartRemoteServerShm(long ola, string token);

StartRemoteServerShm(instance, "value");
python
from ctypes import CDLL, c_int, c_int64, create_string_buffer

ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
ola.StartRemoteServerShm(instance, "value")

返回值

服务句柄:大于 0 表示成功0 表示失败

注意事项